package com.ad.pet.app.collect.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.ad.pet.R;
import com.ad.pet.common.data.utils.glide.GlideUtil;
import com.ad.pet.models.remote.collect.Article;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by SEELE on 2018/7/5.
 */

public class CollectTagAdapter extends BaseQuickAdapter<Article,BaseViewHolder> {
    public CollectTagAdapter( @Nullable List<Article> data) {
        super(R.layout.item_article_collection_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Article item) {
        TextView tvName = helper.getView(R.id.tv_name);
        TextView tvTitle = helper.getView(R.id.tv_price);
        ImageView ivGou = helper.getView(R.id.iv_service);

        tvName.setText(item.getTitle());
        tvTitle.setText(item.getContent());
        GlideUtil.load(mContext,item.getImage(),ivGou);

    }
}
